using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace comm.objst
{
    [Serializable]
    public class TablePlayerFaction
    {
        private string _playerId = null;
        public string PlayerId
        {
            get
            {
                if (_playerId == null)
                {
                    _playerId = "";
                }
                return _playerId;
            }
            set { _playerId = value; }
        }

        private string _facId = null;
        public string FacId
        {
            get
            {
                if (_facId == null)
                {
                    _facId = "";
                }
                return _facId;
            }
            set { _facId = value; }
        }
    }

    [Serializable]
    public class TablePlayer : TableRow, ICodeReplace
    {
#region 2013-1-4 19:16:52
public const string KEY_PLAYER_ID="PlayerId";
public const string USER_ID="UserId";
public const string NICKNAME="Nickname";
public const string DOBJECT_ID="DObjectId";
public const string EQUIP_DIC="EquipDic";
public const string NVALUE_DIC="NValueDic";
public const string STATE_LIST="StateList";
public const string UNIT_READY_DIC="UnitReadyDic";
public const string LAST_LOGIN_TIME="LastLoginTime";
public const string LAST_LOGIN_IP="LastLoginIP";
public const string ROW_STATE_TYPE="RowStateType";
public const string ROW_CREATE_TIME="RowCreateTime";
public const string ROW_DELETE_TIME="RowDeleteTime";
public const string BIG_TEXT_ROW_LOG="RowLog";

#endregion
public comm.CodeFill FillRegion()
        {
            return new CodeFill(CodeFillType.ORM_CONST, this);
        }

        private string _playerId = null;
        [OrmAttr(true)]
        public string PlayerId
        {
            get
            {
                if (_playerId == null)
                {
                    _playerId = comm.GUID.NewString();
                }
                return _playerId;
            }
            set { _playerId = value; }
        }

        private string _userId = null;
        public string UserId
        {
            get
            {
                if (_userId == null)
                {
                    _userId = "";
                }
                return _userId;
            }
            set { _userId = value; }
        }

        private string _nickname = null;
        public string Nickname
        {
            get
            {
                if (_nickname == null)
                {
                    _nickname = "";
                }
                return _nickname;
            }
            set { _nickname = value; }
        }

        private string _dObjectId = null;
        public string DObjectId
        {
            get
            {
                if (_dObjectId == null)
                {
                    _dObjectId = "";
                }
                return _dObjectId;
            }
            set { _dObjectId = value; }
        }

        private Dictionary<ItemEquipType, string> _equipDic = null;
        public Dictionary<ItemEquipType, string> EquipDic
        {
            get
            {
                if (_equipDic == null)
                {
                    _equipDic = new Dictionary<ItemEquipType, string>();
                }
                return _equipDic;
            }
            set { _equipDic = value; }
        }

        private Dictionary<string, long> _nvalueDic = null;
        public Dictionary<string, long> NValueDic
        {
            get
            {
                if (_nvalueDic == null)
                {
                    _nvalueDic = new Dictionary<string, long>();
                }
                return _nvalueDic;
            }
            set { _nvalueDic = value; }
        }

        private List<State> _stateList = null;
        public List<State> StateList
        {
            get
            {
                if (_stateList == null)
                {
                    _stateList = new List<State>();
                }
                return _stateList;
            }
            set { _stateList = value; }
        }

        private Dictionary<int, UnitReady> _unitReadyDic = null;
        public Dictionary<int, UnitReady> UnitReadyDic
        {
            get
            {
                if (_unitReadyDic == null)
                {
                    _unitReadyDic = new Dictionary<int, UnitReady>();
                }
                return _unitReadyDic;
            }
            set { _unitReadyDic = value; }
        }

        private DateTime _lastLoginTime = DateTime.Now;
        public DateTime LastLoginTime
        {
            get { return _lastLoginTime; }
            set { _lastLoginTime = value; }
        }

        private string _lastLoginIP = null;
        public string LastLoginIP
        {
            get
            {
                if (_lastLoginIP == null)
                {
                    _lastLoginIP = "";
                }
                return _lastLoginIP;
            }
            set { _lastLoginIP = value; }
        }
    }
}
